import { defineComponent } from "vue";
import { EffectType } from "../../../../enums/messageEnum";
import { alarmParam } from "@/utils/constants";
export default defineComponent({
	props: {
		modelValue: Number
	},
	emits: [],
	setup(props) {
		const level = Object.values(alarmParam.warningLevel).find(item => item.value == props.modelValue);
		let type = "";
		switch (level?.value) {
			case 1:
				type = EffectType.success;
			case 2:
				type = EffectType.info;
			case 3:
				type = EffectType.warning;
			case 4:
				type = EffectType.danger;
				break;
		}
		return () => {
			return <el-tag type={type}>{level?.label}</el-tag>;
		};
	}
});
